Skip to content

Conversation

@dqwu
Copy link
Collaborator

@dqwu dqwu commented Mar 27, 2025

This PR introduces several updates to the mpi-serial library to
improve consistency and maintainability.

Changes:

  • Align MPI function declarations with MPICH, including
    adjustments to const correctness and the use of arrays
    vs. pointers.
  • Update corresponding function bodies to reflect the changes
    in declarations.
  • Modify internal functions to ensure compatibility with
    updated MPI function signatures.
  • Change buf in struct Req from int* to void* for better
    generality in handling user buffers.
  • Remove the duplicate declaration of MPI_Get_library_version.

The mpi-serial library supports most common MPI calls, but some
function prototypes differ from their MPICH counterparts. This
update ensures consistency by aligning function declarations
with those in MPICH 4.3.0 (see src/include/mpi_proto.h).
@dqwu
Copy link
Collaborator Author

dqwu commented Mar 27, 2025

References:
https://fossies.org/linux/mpich/src/include/mpi_proto.h
E3SM-Project/scorpio#639

Tests:
make tests: PASS
cime_develop test SMS_D_Ln9_Mmpi-serial.f19_g16_rx1.A (with latest SCORPIO master): PASS

Copy link
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution.

Copy link
Collaborator

@jayeshkrishna jayeshkrishna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also include a summary of the changes in the PR (const correctness, arrays vs pointers etc)?

@jayeshkrishna
Copy link
Collaborator

@dqwu : Either update the PR desc (PR commit message) or the change commit message to list out the changes in the PR (you can add the list to the current PR desc for ex). Also make the req buf type change in a separate commit

Updated buf to void* in struct Req for better generality in
handling user buffers.

Added an explicit cast in MPI_Isend() to suppress the warning
about discarded const qualifiers.
@dqwu dqwu requested a review from jayeshkrishna March 27, 2025 22:15
@dqwu
Copy link
Collaborator Author

dqwu commented Mar 27, 2025

Can you also include a summary of the changes in the PR (const correctness, arrays vs pointers etc)?

OK, I have updated the PR description.

@dqwu
Copy link
Collaborator Author

dqwu commented Apr 4, 2025

@jedwards4b, is this PR good to go? Thanks!

@jedwards4b jedwards4b merged commit 3092629 into main Apr 8, 2025
1 check passed
@jedwards4b jedwards4b deleted the dqwu/align-mpi-serial-with-mpich branch April 8, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants